package top.canyue.word_range_service.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.canyue.word_range.pojo.vo.WordMappingVo;
import top.canyue.word_range.result.Result;
import top.canyue.word_range_service.service.WordMappingService;

/**
 * 单词意译相关接口
 */

@RestController
@RequestMapping(value = "/apiV1/wordMapping")
@RequiredArgsConstructor
public class WordMappingController {
    final WordMappingService wordMappingService;

    /**
     * 获取每日一词
     */
    @RequestMapping(value = "/getRandomWordByDay")
    public Result<WordMappingVo> getRandomWordByDay(@RequestHeader String JWT){
        return wordMappingService.getRandomWordByDay();
    }

}
